import Header from './Header.vue'
import dayjs from 'dayjs'

const Myplugin = {
    install(Vue){
        Vue.prototype.$test=function(){
            console.log('test()');
            
        },
        Vue.test = function(){
            console.log('test');
        },
        Vue.component(Header.name,Header),
        // Vue.component("Header",Header),

        Vue.filter ('date-format',(value,formatStr='YYYY-MM-DD HH:mm:ss')=>{
            return dayjs(value).format(formatStr)
        }),
        Vue.directive('upper-text',(el,binding)=>{
            el.innerText = binding.value.toUpperCase()
        })
    }
}

export default Myplugin